<?php
/**
 * Created by PhpStorm.
 * User: yanghe
 * Date: 2016/4/26
 * Time: 17:16
 */
namespace App\Http\Controllers\Test;

use App\Http\Controllers\Controller;
use MyClass\Article\ArticleBase;

class ArticleTestController extends Controller
{
    public function select()
    {
//        $data["desc"]=1;
        $data["sort"]="article_id";
        $data["num"]=0;
        $data["start"]=0;
//        $data["class"]="语文";
        $res=ArticleBase::select($data);
        dump($res);
        exit();

    }
    public function add()
    {
        $data["article_name"]="王宇飞";
        $data["article_point"]="还不错哦";
        $data["article_class"]=1;
        $data["article_user"]=1;
        $data["article_content"]="李作强哈哈，你干什么。好了那。";
        $res=ArticleBase::addArticle($data);
        dump($res);
        exit();

    }
    public function delete()
    {
        $a=new ArticleBase(1);
        $res=$a->deleteArticle();
        dump($res);
        exit();
    }
    public function update()
    {
        $data["article_name"]="hao";
        $a=new ArticleBase(2);
        $b=$a->updateArticle($data);
        dump($b);
        exit();
    }
}